/**
 * 
 */
package hu.gbalage.owlforms.impl.data;

import java.net.URI;

import hu.gbalage.owlforms.api.data.CompositeValue;
import hu.gbalage.owlforms.api.data.PrimitiveValue;

/**
 * @author balage
 *
 */
public class PrimitiveValueImpl implements PrimitiveValue {

	private String value = "";
	
	private final URI type;
	
	/**
	 * 
	 */
	public PrimitiveValueImpl(URI type) {
		this.type = type;
	}

	/* (non-Javadoc)
	 * @see hu.gbalage.owlforms.api.data.PrimitiveValue#getValue()
	 */
	public String getValue() {
		return value;
	}

	/* (non-Javadoc)
	 * @see hu.gbalage.owlforms.api.data.PrimitiveValue#setValue(java.lang.String)
	 */
	public void setValue(String value) {
		this.value = value;
	}

	/* (non-Javadoc)
	 * @see hu.gbalage.owlforms.api.data.FieldValue#getType()
	 */
	public URI getType() {
		return type;
	}

	/* (non-Javadoc)
	 * @see hu.gbalage.owlforms.api.data.FieldValue#isPrimitive()
	 */
	public boolean isPrimitive() {
		return true;
	}

	public CompositeValue asCompositeValue() {
		return null;
	}

	public PrimitiveValue asPrimitiveValue() {
		return this;
	}

}
